package com.chen.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chen.common.Result;
import com.chen.mapper.InfoMapper;
import com.chen.pojo.Info;
import com.chen.service.InfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author chen
 */
@Service("InfoServiceImpl")
@Transactional
public class InfoServiceImpl extends ServiceImpl<InfoMapper, Info> implements InfoService {


    @Resource
    private InfoMapper mapper;

    /**
     * 查询所有信息
     * @return
     */
    public Result findAllInfo(){

        List<Info> infoList = mapper.selectList(null);
        return Result.success(infoList);

    }



}
